<template>
  <a-modal
    v-model:visible="modalVisible"
    @ok="handleOk"
    @cancel="handleCancel"
    :width="600"
  >
    <template #title> 条件类型详情 </template>
    <div class="index">uhhhhhhhhhhhhh</div>
  </a-modal>
</template>

<script setup lang="ts">
import { useVModel } from '@vueuse/core';

const props = withDefaults(
  defineProps<{
    visible: boolean;
  }>(),
  {
    visible: false
  }
);
const emit = defineEmits(['update:visible', 'save']);
const modalVisible = useVModel(props, 'visible', emit);
const handleOk = () => {
  emit('save');
  emit('update:visible', false);
};
const handleCancel = () => {
  emit('update:visible', false);
};
</script>
